//
// Created by nicemoe on 2021/8/7.
//


#include <iostream>

using namespace std;

int main()
{

    char ch;
    int count = 0;
    cout << "Enter characters; enter # to quit: \n";
    while ((ch = cin.get()) != EOF)
    {
        cout.put(char(ch));
        ++count;
    }
    cout << endl << count << " characters read \n";

    return 0;
}
